<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="text/html;charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv ="Pragma" content = "no-cache"/>
    <meta http-equiv="Cache-Control" content="no cache" />
    <meta http-equiv="Expires" content="0" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <script src="${ctxPath!}/plugins/pace/pace.min.js"></script>
    <link href="${ctxPath!}/plugins/pace/themes/pink/pace-theme-flash.css" rel="stylesheet">
    <link href="${ctxPath!}/plugins/fontawesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${ctxPath!}/plugins/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" type="text/css" href="${ctxPath!}/css/fs.css" media="all"/>
    <script type="text/javascript" src="${ctxPath!}/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="${ctxPath!}/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="${ctxPath!}/plugins/frame/js/fsDict.js?v=1.7.0"></script>
    <script type="text/javascript" src="${ctxPath!}/plugins/frame/js/fs.js?v=1.7.0"></script>
    <script type="text/javascript" src="${ctxPath!}/plugins/frame/js/frame.js?v=1.7.0"></script>
</head>
<body>
<div class="layui-fluid">
    <form class="layui-form" id="add_form" >
        <div class="layui-form-item">
            <label class="layui-form-label">旧密码</label>
            <div class="layui-input-inline">
                <input type="password" name="oldPwd" lay-verify="required" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">新密码</label>
            <div class="layui-input-inline">
                <input type="password" id="newPwd" name="newPwd" lay-verify="required" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">确认新密码</label>
            <div class="layui-input-inline">
                <input type="password" name="confirm" lay-verify="required|equals" equalsId="newPwd" autocomplete="off" class="layui-input"/>
            </div>
        </div>
        <hr/>
        <div class="layui-form-item" style="text-align: center;">
            <button class="layui-btn" lay-submit="" lay-filter="save" url="/coreUser/updatePwd.do"><i class="layui-icon">&#xe642;</i>确认</button>
            <button type="button" class="layui-btn layui-btn-primary" function="close">关闭</button>
        </div>
    </form>
</div>
<script type="text/javascript">
    layui.use(['form'], function () {
        var $ = layui.jquery,
            form = layui.form;
        //扩展form表单验证
        form.verify({
            confirmPwd: function (value, item) {
                var newPwd = $("#newPwd").val();
                if (newPwd != '') {
                    if (value != newPwd) {
                        return "两次密码要一致！";
                    }
                }
            }
        });
    });
</script>
</body>
</html>
